package com.freewater.springboot.demo.aop.api.advices.around;

import org.springframework.aop.framework.ProxyFactory;

public class Main {
    public static void main(String[] args) {
        ProxyFactory proxyFactory = new ProxyFactory();
        proxyFactory.addAdvice(new SimpleAroundAdvice());
        proxyFactory.setTarget(new MessagePrinter());
        final MessagePrinter proxy = (MessagePrinter) proxyFactory.getProxy();
        proxy.print(1000000);
    }
}
